home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / am70.zip / PATHINFO.TXT < prev    next >
Text File  |  1991-10-14  |  5KB  |  95 lines

  1.  
  2.              INFORMATION ON THE DOS ENVIRONMENT PATH STRING
  3.              ----------------------------------------------
  4.  
  5.         All versions of PC and MS DOS above 1.x maintain an area in
  6.    memory called the environment.  The environment contains a series of
  7.    text strings that are used by DOS and applications programs for
  8.    various purposes.  You can see what strings are currently in the
  9.    enviroment by typing SET and pressing <RETURN> from the DOS level.  As
  10.    a minimum, the environment will contain the string COMSPEC= followed
  11.    by a DOS directory path and (usually) COMMAND.COM.  Most hard disk
  12.    equipped machines will show the following COMSPEC string:
  13.  
  14.                        COMSPEC=C:\COMMAND.COM
  15.  
  16.         Other strings that frequently appear in the environment are the
  17.    PROMPT= and PATH= strings.  Control of the environment is effected
  18.    through the DOS SET command, which may be entered at the DOS level or
  19.    from a batch (like AUTOEXEC.BAT) file.  For example, if a user desired
  20.    that DOS used a copy of COMMAND.COM that was in a directory named
  21.    C:\DOS, he/she might place the command SET COMSPEC=C:\DOS\COMMAND.COM
  22.    in the AUTOEXEC.BAT file.  After booting, DOS would load COMMAND.COM
  23.    from C:\DOS each time it needed to reload the command interpreter.
  24.    All other copies of COMMAND.COM in the system would be superfluous and
  25.    ignored by DOS.
  26.  
  27.         One very useful string that can be placed in the DOS environment
  28.    by the user is the PATH= string.  When the name of an executable file
  29.    is issued from the DOS level, DOS will first look in the current
  30.    subdirectory for the file.  If it finds it, it loads and executes it
  31.    and all is fine.  If it cannot find the file in the current directory,
  32.    DOS will search the environment for the PATH= designator.  If one
  33.    exists, DOS will search the directories in the PATH= string for the
  34.    executable file.  For example, suppose that the AUTOEXEC.BAT contains
  35.    the command SET PATH=C:\DOS;D:\UTIL;E:\JUNK. Note that directory path
  36.    names are separated by semicolons and can (and should) include the
  37.    drive designator.  Now further suppose that the user is in a directory
  38.    named D:\SOMENAME and desires to run the program MYPROG.EXE but
  39.    MYPROG.EXE is not resident in D:\SOMENAME. When the user enters MYPROG,
  40.    DOS, unable find it in the current directory, starts searching the
  41.    directories in the PATH= string starting with C:\DOS.  If MYPROG.EXE
  42.    was in D:\UTIL, DOS would load and execute the program and D:\UTIL
  43.    would be the active directory when the program received control from
  44.    DOS.  Obviously, if DOS cannot find MYPROG.EXE in any of directories in
  45.    the PATH= string, the message BAD COMMAND OR FILENAME will be
  46.    displayed.  The exact same sequence is followed if a running program
  47.    calls DOS to execute a program.
  48.  
  49.         Each Identifier in the DOS path string MUST be unique.  For
  50.    example, consider the path identifier C:\UTIL\DOS\MYDIR.  Placing
  51.    this string in the DOS path string will NOT automatically place the
  52.    the dirctories C:\UTIL and C:\UTIL\DOS in the DOS path.  Each must
  53.    be uniquely identified by the correct path name.  For each of these
  54.    directories to be identified in the DOS path, the following would
  55.    be entered:
  56.  
  57.                     C:\UTIL;C:\UTIL\DOS;C:\UTIL\DOS\MYDIR
  58.  
  59.         You may have multiple path strings in your AUTOEXEC.BAT file but
  60.    only the last PATH= string is valid.  To ensure that you have the path
  61.    string the way you want it, type PATH and press "Enter" at the DOS
  62.    level.  Also, it is important to include the DOS logical drive
  63.    specification ("C:" or "D:") with each directory.
  64.  
  65.         ArcMaster depends upon the presence of an archive system's
  66.    executable files (PAK.EXE, ARJ.EXE, PKZIP.EXE, etc.). It calls these
  67.    programs by using the command sequence just described and therefore
  68.    will not function properly unless these programs are in a directory
  69.    specified in the PATH= string.  The simplest thing to do is to place
  70.    your archive system files and LIST.COM in one subdirectory and place
  71.    its DOS path name in the environment.  For example, suppose you are
  72.    using PKWare and you place PKZIP, PKUNXIP, and LIST in a directory
  73.    named C:\ARCUTILS.  Placing the following line in your AUTOEXEC.BAT
  74.    file and rebooting will ensure that ArcMaster will function properly:
  75.  
  76.                            PATH=C:\ARCUTILS
  77.  
  78.    Obviously, the PATH= string can contain other directory path names and
  79.    you may already have a PATH= command in your AUTOEXEC.BAT file.  If
  80.    so, just add the directory containing the archive system files to the
  81.    string.  For maximum speed, make it the first directory name in the
  82.    string.
  83.  
  84.         If you are having difficulty determining which archive system
  85.    program and support files are in the current DOS PATH, run
  86.    ArcMaster and press Ctrl+F2.  A window containing a list of the
  87.    various executable files that might be used by ArcMaster is
  88.    displayed with an indication of where in the DOS path it was
  89.    found.
  90.  
  91.         Remember, any time you see the message "Bad command or file name"
  92.    it is DOS telling you that you do not have the called program in the
  93.    path.
  94.  
  95.